package com.example.administrator.kotlin.adapter

import android.support.v4.app.FragmentActivity
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.administrator.kotlin.R

/**
 * Created by Administrator on 2018/3/1/001.
 */
class MyAdapter(val item: List<String>, val activity: FragmentActivity) : RecyclerView.Adapter<MyAdapter.Holder>() {

    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): Holder {
        val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_string, parent, false)
        return Holder(view)
    }

    override fun getItemCount(): Int {
        return item.size
    }

    override fun onBindViewHolder(holder: Holder?, position: Int) {
    }

    class Holder(val view: View) : RecyclerView.ViewHolder(view) {

    }
}